#include <algorithm>
#include <cassert>
#include <vector>

using namespace std;

class Solution {
public:
    vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) {
        vector<bool> res;

        int maxNum = *max_element(candies.begin(), candies.end());
        for (int i = 0; i < candies.size(); ++i) {
            res.push_back(candies[i] + extraCandies >= maxNum);
        }

        return res;
    }
};

int main() {
    Solution s;

    int extraCandies = 3;
    vector<int> candies{2, 3, 5, 1, 3};
    vector<bool> res{true, true, true, false, true};

    assert(s.kidsWithCandies(candies, extraCandies) == res);

    return 0;
}